<style lang="scss">
.media .img{
    background:50% 50% / cover;
}
.media video{
    object-fit:cover
}
.media{
    bottom:0;
    left:0;
    position:absolute;
    right:0;
    top:0;
}
.media > *{
    height:100%;
    width:100%;
}
</style>
<template lang="pug">
.media
    .img(
        :style="{backgroundImage:'url('+prefix+src+')'}" 
        v-if="src.startsWith('img/')"
    )
    video(:src="prefix+src" v-if="src.startsWith('video/')" muted x5-video-player-type="h5" x5-video-player-fullscreen="true" poster="//cdn-321.xvc.com/spin.svg")
</template>
<script lang="coffee">
export default {
    props: {
        src:String
        prefix:String
    }
}
</script>
